'use strict';

function login() {
    let username = $('[name=username]').val()
    let password = $('[name=pwd]').val()

    let obj = {
        username,
        password
    }

    $.post('http://localhost:3000/login', obj, (res) => {
        if (res.code === 200) {
            window.location.href = './index.html'
        } else {
            alert(res.msg)
        }
    })
}

function register() {

}